//
//  UICollectionView+AD.swift
//  ADKit
//
//  Created by Adoma on 2024/1/29.
//

import UIKit

extension UICollectionView {
    
    /// by ADKit
    public convenience init(layout: UICollectionViewLayout) {
        self.init(frame: .zero, collectionViewLayout: layout)
    }
    
    /// by ADKit
    public convenience init(_ config: (_ layout: UICollectionViewFlowLayout)->Void) {
        let layout = UICollectionViewFlowLayout()
        config(layout)
        self.init(layout: layout)
    }
    
}
